using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DataAccess.Mapping;
using Entity.StoreProcedure;
namespace BusinessObjects.BO_Actions.Sec_Admin_Modules
{
    public class BOSec_Admin_Modules_Order
    {
        /// <summary>
        /// Thuc thi store : usp_Sec_Admin_Modules_Order. Kieu du lieu tra ve la : DataTable
        /// </summary>
        public DataTable ExecuteAndReturnDataTable(usp_Sec_Admin_Modules_Order _entity)
        {
            DataTable objDT = new DataTable();
            StoreProcedure<usp_Sec_Admin_Modules_Order> _action = new StoreProcedure<usp_Sec_Admin_Modules_Order>();
            try
            {
                objDT = _action.ExecuteSPAndReturnDataTable(_entity, typeof(usp_Sec_Admin_Modules_Order));
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return objDT;
        }

        /// <summary>
        /// Thuc thi store : usp_Sec_Admin_Modules_Order. Kieu du lieu tra ve la : DataTable.
        /// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
        /// </summary>
        public DataTable ExecuteListDataAndReturnDataTable(List<usp_Sec_Admin_Modules_Order> _listEntity)
        {
            DataTable objDT = new DataTable();
            foreach (usp_Sec_Admin_Modules_Order _entity in _listEntity)
            {
                StoreProcedure<usp_Sec_Admin_Modules_Order> _action = new StoreProcedure<usp_Sec_Admin_Modules_Order>();
                try
                {
                    objDT = _action.ExecuteSPAndReturnDataTable(_entity, typeof(usp_Sec_Admin_Modules_Order));
                }
                catch (Exception ex)
                {
                    throw ex;
                }

            }

            return objDT;
        }

        /// <summary>
        /// Thuc thi store : usp_Sec_Admin_Modules_Order. Kieu du lieu tra ve la : bool
        /// </summary>
        public bool ExecuteAndReturnBooleanValue(usp_Sec_Admin_Modules_Order _entity)
        {
            StoreProcedure<usp_Sec_Admin_Modules_Order> _action = new StoreProcedure<usp_Sec_Admin_Modules_Order>();
            try
            {
                _action.ExecuteSP(_entity, typeof(usp_Sec_Admin_Modules_Order));
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return true;
        }

        /// <summary>
        /// Thuc thi store : usp_Sec_Admin_Modules_Order. Kieu du lieu tra ve la : bool.
        /// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
        /// </summary>
        public bool ExecuteListDataAndReturnBooleanValue(List<usp_Sec_Admin_Modules_Order> _listEntity)
        {
            DataTable objDT = new DataTable();
            foreach (usp_Sec_Admin_Modules_Order _entity in _listEntity)
            {
                StoreProcedure<usp_Sec_Admin_Modules_Order> _action = new StoreProcedure<usp_Sec_Admin_Modules_Order>();
                try
                {
                    _action.ExecuteSPAndReturnDataTable(_entity, typeof(usp_Sec_Admin_Modules_Order));
                }
                catch (Exception ex)
                {
                    throw ex;
                }

            }

            return true;
        }

        /// <summary>
        /// Thuc thi store : usp_Sec_Admin_Modules_Order. Kieu du lieu tra ve la : String.
        /// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
        /// </summary>
        public String ExecuteAndReturnStringValue(usp_Sec_Admin_Modules_Order _entity)
        {
            string strReturn = null;
            StoreProcedure<usp_Sec_Admin_Modules_Order> _action = new StoreProcedure<usp_Sec_Admin_Modules_Order>();
            try
            {
                strReturn = _action.ExecuteSPAndReturnString(_entity, typeof(usp_Sec_Admin_Modules_Order));
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return strReturn;
        }

        /// <summary>
        /// Thuc thi store : usp_Sec_Admin_Modules_Order. Kieu du lieu tra ve la : String.
        /// Khi nao thuc thi nhieu hon 1 dong du lieu thi su dung ham nay
        /// </summary>
        public String ExecuteListDataAndReturnStringValue(List<usp_Sec_Admin_Modules_Order> _listEntity)
        {
            string strReturn = null;
            foreach (usp_Sec_Admin_Modules_Order _entity in _listEntity)
            {
                StoreProcedure<usp_Sec_Admin_Modules_Order> _action = new StoreProcedure<usp_Sec_Admin_Modules_Order>();
                try
                {
                    strReturn = _action.ExecuteSPAndReturnString(_entity, typeof(usp_Sec_Admin_Modules_Order));
                }
                catch (Exception ex)
                {
                    throw ex;
                }

            }

            return strReturn;
        }

    }
}

